package com.chang.controller;

import com.chang.entity.ScalePersonality;
import com.chang.mapper.ScalePersonalityMapper;
import com.chang.service.ScalePersonalityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.Enumeration;
import java.util.List;
import java.util.Map;

@Controller
public class ScalePersonalityController {
    @Autowired
    private ScalePersonalityService scalePersonalityService;

    @RequestMapping("/select")
    public String selectAll(HttpServletRequest request){
        List<ScalePersonality> list = scalePersonalityService.selectAll();
        request.setAttribute("personalities",list);
        return "personalityShow";
    }
    @RequestMapping("/{path}")
    public String page(@PathVariable("path")String path){
        return path;
    }
    @RequestMapping("/submit")
    public String submit(HttpServletRequest request){
        request.getParameter("0");
        return "personalityShow";
    }
}
